package com.itheima.test6;

public class TestSwimming {
    public static void main(String[] args) {

        goSwimming(new iSwimming(){
            @Override
            public void show() {
                System.out.println("我们去游泳吧~");
            }
        });

        goSwimming(new iSwimming() {
            @Override
            public void show() {
                System.out.println("铁子，我们去游泳吧~");
            }
        });
    }

    public static void goSwimming(iSwimming swimming) {
        swimming.show();
    }
}

interface iSwimming {
    void show();
}
